home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- //
- // Creation Date: July 27, 1998
- // Author: cdt
- //
- // Procedure Name:
- // AEscriptTemplate
- //
- // Description:
- // Controls for script nodes.
- //
- // Input Value:
- // nodeName
- //
- // Output Value:
- // None
- //
-
- global proc AEbeforeScriptFieldNew(string $attrName)
- {
- global int $gTextColumnWidthIndex;
- setUITemplate -pst attributeEditorTemplate;
- formLayout beforeScriptForm;
- text -l "Before" beforeScriptText;
- textField -ed 0 beforeScriptField;
- setParent ..;
- formLayout -e
- -aof beforeScriptText right (5 - $gTextColumnWidthIndex)
- -af beforeScriptText top 0
- -af beforeScriptText bottom 0
- -an beforeScriptText left
- -af beforeScriptField top 0
- -af beforeScriptField bottom 0
- -af beforeScriptField right 0
- -ac beforeScriptField left 5 beforeScriptText
- beforeScriptForm;
-
- setUITemplate -ppt;
-
- AEbeforeScriptFieldReplace($attrName);
- }
-
- global proc AEafterScriptFieldNew(string $attrName)
- {
- global int $gTextColumnWidthIndex;
- setUITemplate -pst attributeEditorTemplate;
- formLayout afterScriptForm;
- text -l "After" afterScriptText;
- textField -ed 0 afterScriptField;
- setParent ..;
- formLayout -e
- -aof afterScriptText right (5 - $gTextColumnWidthIndex)
- -af afterScriptText top 0
- -af afterScriptText bottom 0
- -an afterScriptText left
- -af afterScriptField top 0
- -af afterScriptField bottom 0
- -af afterScriptField right 0
- -ac afterScriptField left 5 afterScriptText
- afterScriptForm;
-
- setUITemplate -ppt;
-
- AEafterScriptFieldReplace($attrName);
- }
-
- global proc AEbeforeScriptFieldReplace(string $attrName)
- {
- scriptJob -rp -p beforeScriptField
- -attributeChange $attrName
- ("AEbeforeScriptFieldUpdate " + $attrName);
- AEbeforeScriptFieldUpdate $attrName;
- }
-
- global proc AEafterScriptFieldReplace(string $attrName)
- {
- scriptJob -rp -p afterScriptField
- -attributeChange $attrName
- ("AEafterScriptFieldUpdate " + $attrName);
- AEafterScriptFieldUpdate $attrName;
- }
-
- global proc AEbeforeScriptFieldUpdate(string $attrName)
- {
- string $script = `getAttr $attrName`;
- textField -e -tx $script beforeScriptField;
- }
-
- global proc AEafterScriptFieldUpdate(string $attrName)
- {
- string $script = `getAttr $attrName`;
- textField -e -tx $script afterScriptField;
- }
-
- global proc AEscriptTemplate(string $nodeName)
- {
- editorTemplate -beginScrollLayout;
- editorTemplate -beginLayout "Script Attributes" -collapse 0;
- editorTemplate -addControl "scriptType";
- editorTemplate -callCustom "AEbeforeScriptFieldNew"
- "AEbeforeScriptFieldReplace"
- "before";
- editorTemplate -callCustom "AEafterScriptFieldNew"
- "AEafterScriptFieldReplace"
- "after";
- editorTemplate -endLayout;
-
- AEdependNodeTemplate $nodeName;
-
- editorTemplate -suppress "after";
- editorTemplate -suppress "before";
-
- editorTemplate -addExtraControls;
-
- editorTemplate -endLayout;
- editorTemplate -endScrollLayout;
- }
-